package com.timmy.chi.sql;

/**
 * Created by Timmy on 2017/3/19.
 */
public interface BlackListDB {

    /**
     * 数据库的名字
     */
    String DB_NAME = "black_list.db";

    /**
     * 这是数据库的版本
     */
    int DB_VERSION = 1;


    /**
     * _id  ,   number ,  type
     */
    public interface TableBlackList {

        String TABLE_NAME = "chenchen";

        String COLUMN_ID       = "_id";

        String COLUMN_USERNAME = "username";
        String COLUMN_PASSWORD = "password";            //
        String COLUMN_MONEY    = "money";
        String COLUMN_ORDER    = "caipin";
        String COLUMN_TIME     = "time";
        String COLUMN_TYPE     = "type";

        String TABLE_SQL = "CREATE TABLE " + TABLE_NAME + " ( "
                + COLUMN_ID + " INTEGER PRIMARY KEY AUTOINCREMENT, "
                + COLUMN_USERNAME + " VARCHAR,"   //生成了限定， 一旦存在这个号码，以后就不能添加进来了。
                + COLUMN_MONEY + " double,"   //生成了限定， 一旦存在这个号码，以后就不能添加进来了。
                + COLUMN_ORDER + " varchar(20),"   //生成了限定， 一旦存在这个号码，以后就不能添加进来了。
                + COLUMN_TIME + " long,"   //生成了限定， 一旦存在这个号码，以后就不能添加进来了。
                + COLUMN_TYPE + " INTEGER)";

        String USER_TABLE_NAME = "user";
        String TABLE_SQL_USER = "CREATE TABLE " + USER_TABLE_NAME + " ( "
                + COLUMN_ID + " INTEGER PRIMARY KEY AUTOINCREMENT, "
                + COLUMN_USERNAME + " VARCHAR UNIQUE,"   //生成了限定， 一旦存在这个号码，以后就不能添加进来了。
                + COLUMN_PASSWORD + " VARCHAR(20))";


        // 商品名称
        String TABLE_NAME_GOODS = "goods";
        String COLUMN_GOODS_NAME = "goods_name";            //
        String COLUMN_GOODS_PRICE = "goods_price";            //
        String COLUMN_GOODS_PIC = "goods_pic";            //
        String COLUMN_GOODS_MATERIAL = "goods_material";            //
        String TABLE_SQL_GOODS = "CREATE TABLE " + TABLE_NAME_GOODS + " ( "
                + COLUMN_ID + " INTEGER PRIMARY KEY AUTOINCREMENT, "
                + COLUMN_GOODS_NAME + " VARCHAR,"   //生成了限定， 一旦存在这个号码，以后就不能添加进来了。
                + COLUMN_GOODS_PRICE + " double,"
                + COLUMN_GOODS_PIC + " VARCHAR,"
                + COLUMN_GOODS_MATERIAL + " VARCHAR,"
                + COLUMN_TYPE + " INTEGER)";


    }
}